package com.techstar.ats.codec.live.decoder;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.codec.Decoder;
import com.techstar.ats.codec.StringCodec;
import com.techstar.ats.dxp.live.F06RouteStatus;
import com.techstar.ats.type.RouteStatusType;

public enum F06RouteStatusDecoder implements Decoder<F06RouteStatus> {
	INSTANCE;

	public F06RouteStatus create() {
		return new F06RouteStatus();
	}

	public void decode(ByteBuf buf, F06RouteStatus value) {
		value.routeName = (new StringCodec(64)).get(buf);
		value.routeStatus = RouteStatusType.valueOf(buf.readUnsignedByte());
	}
}
